package com.bytedance.touch

import com.squareup.moshi.Moshi

val moshi: Moshi by lazy {
    Moshi.Builder().build()
}

inline fun <reified T> T.toJson(): String {
    val adapter = moshi.adapter(T::class.java)
    return adapter.toJson(this)
}